home *** CD-ROM | disk | FTP | other *** search
/ Gamers Delight 2 / Gamers Delight 2.iso / Aminet / game / misc / ShuffleRun.lzh / ShuffleRun / Sources.lha / Sources / SR1.c < prev    next >
C/C++ Source or Header  |  1993-02-13  |  28KB  |  1,434 lines

  1. #include <exec/types.h>
  2. #include <exec/memory.h>
  3. #include <intuition/intuition.h>
  4. #include <graphics/text.h>
  5. #include <libraries/dos.h>
  6. #include <EasySound.h>
  7.  
  8. #define LEFT 1
  9. #define RIGHT 2
  10. #define UP 3
  11. #define DOWN 4
  12.  
  13. #define FLOOR 2
  14. #define BONUS 3
  15. #define GREYWALL 1
  16. #define PINKWALL 0
  17. #define PINKWALL2 4
  18. #define CLOSEDDOOR 5
  19. #define OPENEDDOOR 6
  20. #define KEY 7
  21. #define HOLE 8
  22. #define P1BONUS 9
  23. #define P2BONUS 10
  24.  
  25. #define FIRE   1
  26. #define RIGHT  2
  27. #define LEFT   4
  28. #define DOWN   8
  29. #define UP    16
  30.  
  31. #define PORT1 1
  32. #define PORT2 2
  33.  
  34. struct TextAttr Font1DEF =
  35.     {
  36.     "topaz.font",
  37.     8,
  38.     FS_NORMAL,
  39.     FPF_ROMFONT
  40.     };
  41.  
  42. struct TextAttr Font2DEF =
  43.     {
  44.     "AM.font",
  45.     18,
  46.     FS_NORMAL,
  47.     FPF_DISKFONT
  48.     };
  49.  
  50. struct NewScreen PanelScreenDEF =
  51.     {
  52.     0, 195, 320, 56,
  53.     4,
  54.     0, 1,
  55.     SPRITES,
  56.     CUSTOMSCREEN,
  57.     &Font1DEF,
  58.     NULL,
  59.     NULL,
  60.     NULL
  61.     };
  62.  
  63. struct NewWindow PanelWindowDEF =
  64.     {
  65.     0, 0, 320, 56,
  66.     0, 1,
  67.     VANILLAKEY,
  68.     BORDERLESS | SIMPLE_REFRESH | NOCAREREFRESH | RMBTRAP | ACTIVATE,
  69.     NULL,
  70.     NULL,
  71.     NULL,
  72.     NULL,
  73.     NULL,
  74.     0, 0, 0, 0,
  75.     CUSTOMSCREEN
  76.     };
  77.  
  78. USHORT PanelColors[16];
  79.  
  80. struct NewScreen GameScreenDEF =
  81.     {
  82.     0, 0, 320, 256,
  83.     4,
  84.     0, 1,
  85.     SPRITES,
  86.     CUSTOMSCREEN,
  87.     &Font2DEF,
  88.     NULL,
  89.     NULL,
  90.     NULL
  91.     };
  92.  
  93. struct NewWindow GameWindowDEF =
  94.     {
  95.     0, 0, 320, 200,
  96.     0, 1,
  97.     VANILLAKEY,
  98.     BORDERLESS | SIMPLE_REFRESH | NOCAREREFRESH | RMBTRAP | ACTIVATE,
  99.     NULL,
  100.     NULL,
  101.     NULL,
  102.     NULL,
  103.     NULL,
  104.     0, 0, 0, 0,
  105.     CUSTOMSCREEN
  106.     };
  107.  
  108. USHORT StdColors[16];
  109. USHORT GameColors[16];
  110.  
  111. __chip USHORT mousedata[] =
  112.     {
  113.     0, 0, 0, 0
  114.     };
  115.  
  116. struct Screen *gscreen = NULL;
  117. struct Screen *pscreen = NULL;
  118. struct Window *gwindow = NULL;
  119. struct Window *pwindow = NULL;
  120. struct RastPort *grp;
  121. struct RastPort *prp;
  122. struct ViewPort *gvp;
  123. struct ViewPort *pvp;
  124. UBYTE *gplane[4];
  125. UBYTE *pplane[4];
  126. APTR font2 = NULL;
  127. CPTR MoveSound = NULL;
  128. CPTR ShuffleSound = NULL;
  129. CPTR NoShuffleSound = NULL;
  130. CPTR BonusSound = NULL;
  131. CPTR FallSound = NULL;
  132. CPTR DoorSound = NULL;
  133. CPTR End1Sound = NULL;
  134. CPTR End2Sound = NULL;
  135.  
  136. BOOL music = FALSE;
  137. BOOL sound;
  138. CPTR song = NULL;
  139.  
  140. char Buffer[20];
  141.  
  142. /****************************/
  143. /* GAME DATA            */
  144. /****************************/
  145.  
  146. UBYTE Area[12][20];
  147.  
  148. SHORT Level = 1;
  149. SHORT Bonus = 0;
  150.  
  151. SHORT PlayerCount = 2;
  152.  
  153. struct Player
  154.     {
  155.     SHORT XPos, YPos;
  156.     SHORT Score, Keys;
  157.     SHORT Count, Collect;
  158.     SHORT GamesWon, GamesPlayed;
  159.  
  160.     char *Name;
  161.     };
  162.  
  163. struct Player Player[10] =
  164.     {
  165.     0, 0, 0, 0, 0, 0, 0, 0, "Pink",
  166.     0, 0, 0, 0, 0, 0, 0, 0, "Romulus",
  167.     0, 0, 0, 0, 0, 0, 0, 0, "Larry P.",
  168.     0, 0, 0, 0, 0, 0, 0, 0, "Donald D.",
  169.     0, 0, 0, 0, 0, 0, 0, 0, "J.R.",
  170.     0, 0, 0, 0, 0, 0, 0, 0, "Jan P.",
  171.     0, 0, 0, 0, 0, 0, 0, 0, "Cruise",
  172.     0, 0, 0, 0, 0, 0, 0, 0, "Heinz",
  173.     0, 0, 0, 0, 0, 0, 0, 0, "Herbert",
  174.     0, 0, 0, 0, 0, 0, 0, 0, "Hugo"
  175.     };
  176.  
  177. struct Player *p1, *p2;
  178.  
  179. /****************************/
  180. /* FUNCTION DECLARARTION    */
  181. /****************************/
  182.  
  183. SHORT Game();
  184. void Competition();
  185. void EditLevel();
  186. void LoadGraphics();
  187. void LoadPanel();
  188. void LoadLevel();
  189. void LoadSounds();
  190. void OpenAll();
  191. void CloseAll(__A0 char *);
  192. void DoPlayer(__A0 struct Player *, __A1 struct Player *);
  193.  
  194. void PutArea(__D0 SHORT, __D1 SHORT);
  195. void PrintAt(__A0 struct RastPort *, __D0 SHORT, __D1 SHORT, __D2 SHORT, __D3 char *);
  196. void OPrintAt(__A0 struct RastPort *, __D0 SHORT, __D1 SHORT, __D2 SHORT, __D3 char *);
  197.  
  198. LONG InitPlayer();
  199. void RemMPlayer();
  200. void PlayModule(__A0 CPTR);
  201. void PlayModule2(__A0 CPTR);
  202. void StopPlayer();
  203. CPTR LoadModule(__A0 char *);
  204. void UnLoadModule(__A0 CPTR);
  205.  
  206. UBYTE Joystick();
  207.  
  208. /****************************/
  209. /* MAIN             */
  210. /****************************/
  211.  
  212. int main()
  213.     {
  214.     BOOL bool = TRUE;
  215.     BOOL redraw = TRUE;
  216.     BOOL keyboard = FALSE;
  217.     BOOL change;
  218.     char Buffer[20];
  219.     SHORT mode = 0, page = 0;
  220.  
  221.     OpenAll();
  222.     LoadSounds();
  223.     LoadPanel();
  224.     LoadGraphics();
  225.  
  226.     if ( music )
  227.         sound = FALSE;
  228.     else
  229.         sound = TRUE;
  230.  
  231.     while (bool)
  232.         {
  233.         if ( redraw )
  234.             {
  235.             redraw = FALSE;
  236.  
  237.             SetAPen(grp, 0);
  238.             RectFill(grp, 0, 0, 319, 191);
  239.  
  240.             StdColors[0] = 0x000;
  241.             StdColors[1] = 0x000;
  242.             StdColors[2] = 0x000;
  243.             StdColors[3] = 0x000;
  244.             LoadRGB4(gvp, StdColors, 16);
  245.  
  246.             OPrintAt(grp, 160, 20, 0, "Shuffle Run");
  247.             OPrintAt(grp, 160, 40, 0, "Coding by PINK");
  248.             OPrintAt(grp, 160, 60, 0, "© 1992 by Paradise Soft");
  249.  
  250.             sprintf(Buffer, "Page   %u", page+1);
  251.             OPrintAt(grp, 150, 90, 1, Buffer);
  252.  
  253.             switch ( page )
  254.                 {
  255.                 case 0 :
  256.                     sprintf(Buffer, "Level   %u", Level);
  257.                     OPrintAt(grp, 150, 115, 1, Buffer);
  258.                     OPrintAt(grp, 150, 135, 1, "»S« tart game");
  259.                     OPrintAt(grp, 150, 155, 1, "»E« dit level");
  260.                     OPrintAt(grp, 150, 180, 1, "»Q« uit");
  261.                     break;
  262.                 case 1 :
  263.                     if ( music )
  264.                     OPrintAt(grp, 150, 115, 1, "»M« usic On");
  265.                     else
  266.                     OPrintAt(grp, 150, 115, 1, "»M« usic Off");
  267.  
  268.                     if ( sound )
  269.                     OPrintAt(grp, 150, 135, 1, "»S« ound On");
  270.                     else
  271.                     OPrintAt(grp, 150, 135, 1, "»S« ound Off");
  272.                     break;
  273.                 case 2 :
  274.                     sprintf(Buffer, "%u  Player", PlayerCount);
  275.                     OPrintAt(grp, 150, 115, 1, Buffer);
  276.                     sprintf(Buffer, "Startlevel   %u", Level);
  277.                     OPrintAt(grp, 150, 135, 1, Buffer);
  278.                     OPrintAt(grp, 150, 155, 1, "Competition");
  279.                     break;
  280.                 }
  281.  
  282.             StdColors[1] = 0xFFF;
  283.             StdColors[2] = 0xAAA;
  284.             StdColors[3] = 0x777;
  285.             StdColors[4] = 0x707;
  286.             LoadRGB4(gvp, StdColors, 16);
  287.  
  288.             change = TRUE;
  289.             }
  290.  
  291.         UBYTE joy = Joystick(PORT2);
  292.  
  293.         if ( joy & 24 )
  294.             {
  295.             change = TRUE;
  296.  
  297.             if ( joy & 8 )
  298.                 {
  299.                 mode++;
  300.  
  301.                 switch ( page )
  302.                     {
  303.                     case 0 :
  304.                         if ( mode > 4 )
  305.                         mode = 0;
  306.                         break;
  307.                     case 1 :
  308.                         if ( mode > 2 )
  309.                         mode = 0;
  310.                         break;
  311.                     case 2 :
  312.                         if ( mode > 3 )
  313.                         mode = 0;
  314.                         break;
  315.                     }
  316.                 }
  317.             else
  318.                 {
  319.                 if ( mode > 0 )
  320.                     mode--;
  321.                 else
  322.                     switch ( page )
  323.                     {
  324.                         case 0 :
  325.                         mode = 4;
  326.                         break;
  327.                         case 1 :
  328.                         mode = 2;
  329.                         break;
  330.                         case 2 :
  331.                         mode = 3;
  332.                         break;
  333.                     }
  334.                 }
  335.             }
  336.  
  337.         if ( change )
  338.             {
  339.             change = FALSE;
  340.  
  341.             SetAPen(grp, 0);
  342.             RectFill(grp, 160, 75, 319, 185);
  343.  
  344.             switch ( mode + page*10)
  345.                 {
  346.                 case 0 :
  347.                 case 10 :
  348.                 case 20 :
  349.                     OPrintAt(grp, 170, 90, -1, "<- ->");
  350.                     break;
  351.  
  352.                 case 1 :
  353.                     OPrintAt(grp, 170, 115, -1, "<- ->");
  354.                     break;
  355.                 case 2 :
  356.                     OPrintAt(grp, 170, 135, -1, "<-");
  357.                     break;
  358.                 case 3 :
  359.                     if ( (Level > 300) && (Level < 400) )
  360.                     OPrintAt(grp, 170, 155, -1, "<-");
  361.                     else
  362.                     OPrintAt(grp, 170, 155, -1, "lock");
  363.                     break;
  364.                 case 4 :
  365.                     OPrintAt(grp, 170, 185, -1, "<-");
  366.                     break;
  367.  
  368.                 case 11 :
  369.                     OPrintAt(grp, 170, 115, -1, "<-");
  370.                     break;
  371.                 case 12 :
  372.                     OPrintAt(grp, 170, 135, -1, "<-");
  373.                     break;
  374.  
  375.                 case 21 :
  376.                     OPrintAt(grp, 170, 115, -1, "<- ->");
  377.                     break;
  378.                 case 22 :
  379.                     OPrintAt(grp, 170, 135, -1, "<- ->");
  380.                     break;
  381.                 case 23 :
  382.                     OPrintAt(grp, 170, 155, -1, "<-");
  383.                     break;
  384.                 }
  385.             }
  386.  
  387.         switch ( mode + page*10 )
  388.             {
  389.             case 0 :
  390.             case 10 :
  391.             case 20 :
  392.                 /***************/
  393.                 /* select page */
  394.                 /***************/
  395.  
  396.                 if ( joy & 2 )
  397.                 {
  398.                     page++;
  399.                     if ( page > 2 )
  400.                     page = 0;
  401.  
  402.                     redraw = TRUE;
  403.                 }
  404.                 else if ( joy & 4 )
  405.                 {
  406.                     page--;
  407.                     if ( page < 0 )
  408.                     page = 2;
  409.  
  410.                     redraw = TRUE;
  411.                 }
  412.                 break;
  413.  
  414.             case 1 :
  415.             case 22 :
  416.                 /****************/
  417.                 /* select level */
  418.                 /****************/
  419.  
  420.                 if ( joy & 2 )
  421.                 {
  422.                     SHORT i, d = 20;
  423.  
  424.                     while ( (Joystick(PORT2) & 2) && (Level < 400) )
  425.                     {
  426.                         Level++;
  427.                         SetAPen(grp, 0);
  428.                         if ( page == 0 )
  429.                         {
  430.                             sprintf(Buffer, "Level   %u", Level);
  431.                             RectFill(grp, 0, 100, 160, 120);
  432.                             OPrintAt(grp, 150, 115, 1, Buffer);
  433.                         }
  434.                         else
  435.                         {
  436.                             sprintf(Buffer, "Startlevel   %u", Level);
  437.                             RectFill(grp, 0, 120, 160, 140);
  438.                             OPrintAt(grp, 150, 135, 1, Buffer);
  439.                         }
  440.  
  441.                         for ( i = d ; i && (Joystick(PORT2) & 2); i-- )
  442.                         Delay(1);
  443.  
  444.                         if ( d > 1 )
  445.                         d--;
  446.                     }
  447.  
  448.                     keyboard = FALSE;
  449.                 }
  450.  
  451.                 if ( joy & 4 )
  452.                 {
  453.                     SHORT i, d = 20;
  454.  
  455.                     while ( (Joystick(PORT2) & 4) && (Level > 1) )
  456.                     {
  457.                         Level--;
  458.                         SetAPen(grp, 0);
  459.                         if ( page == 0 )
  460.                         {
  461.                             sprintf(Buffer, "Level   %u", Level);
  462.                             RectFill(grp, 0, 100, 160, 120);
  463.                             OPrintAt(grp, 150, 115, 1, Buffer);
  464.                         }
  465.                         else
  466.                         {
  467.                             sprintf(Buffer, "Startlevel   %u", Level);
  468.                             RectFill(grp, 0, 120, 160, 140);
  469.                             OPrintAt(grp, 150, 135, 1, Buffer);
  470.                         }
  471.  
  472.                         for ( i = d ; i && (Joystick(PORT2) & 4); i-- )
  473.                         Delay(1);
  474.  
  475.                         if ( d > 1 )
  476.                         d--;
  477.                     }
  478.                 }
  479.                 break;
  480.  
  481.             case 2 :
  482.                 /**************/
  483.                 /* start game */
  484.                 /**************/
  485.  
  486.                 if ( joy & 1 )
  487.                 {
  488.                     if ( Level != 0 )
  489.                     {
  490.                         p1 = &Player[0];
  491.                         p2 = &Player[1];
  492.                         LoadLevel();
  493.                         Game();
  494.                         redraw = TRUE;
  495.                     }
  496.                 }
  497.                 break;
  498.  
  499.             case 3 :
  500.                 /**************/
  501.                 /* edit level */
  502.                 /**************/
  503.  
  504.                 if ( joy & 1 )
  505.                 {
  506.                     if ( (Level > 300) && (Level < 400) )
  507.                     {
  508.                         LoadLevel();
  509.                         EditLevel();
  510.                         redraw = TRUE;
  511.                     }
  512.                     else
  513.                     DisplayBeep(NULL);
  514.                 }
  515.                 break;
  516.  
  517.             case 4 :
  518.                 /********/
  519.                 /* quit */
  520.                 /********/
  521.  
  522.                 if ( joy & 1 )
  523.                 {
  524.                     bool = FALSE;
  525.                 }
  526.                 break;
  527.  
  528.             case 11 :
  529.                 /****************/
  530.                 /* switch music */
  531.                 /****************/
  532.  
  533.                 if ( joy & 1 )
  534.                 {
  535.                     music = !music;
  536.                     if ( !song )
  537.                     music = FALSE;
  538.  
  539.                     SetAPen(grp, 0);
  540.                     RectFill(grp, 0, 100, 160, 120);
  541.  
  542.                     if ( music )
  543.                     {
  544.                         sound = FALSE;
  545.                         RectFill(grp, 0, 120, 160, 140);
  546.                         OPrintAt(grp, 150, 115, 1, "»M« usic On");
  547.                         OPrintAt(grp, 150, 135, 1, "»S« ound Off");
  548.  
  549.                         PlayModule2(song);
  550.                     }
  551.                     else
  552.                     {
  553.                         OPrintAt(grp, 150, 115, 1, "»M« usic Off");
  554.                         StopPlayer();
  555.                     }
  556.                 }
  557.                 break;
  558.  
  559.             case 12 :
  560.                 /****************/
  561.                 /* switch sound */
  562.                 /****************/
  563.  
  564.                 if ( joy & 1 )
  565.                 {
  566.                     sound = !sound;
  567.  
  568.                     SetAPen(grp, 0);
  569.                     RectFill(grp, 0, 120, 160, 140);
  570.  
  571.                     if ( sound )
  572.                     {
  573.                         music = FALSE;
  574.                         StopPlayer();
  575.  
  576.                         RectFill(grp, 0, 100, 160, 120);
  577.                         OPrintAt(grp, 150, 115, 1, "»M« usic Off");
  578.                         OPrintAt(grp, 150, 135, 1, "»S« ound On");
  579.                     }
  580.                     else
  581.                     {
  582.                         OPrintAt(grp, 150, 135, 1, "»S« ound Off");
  583.                     }
  584.                 }
  585.                 break;
  586.  
  587.             case 21 :
  588.                 /**********************/
  589.                 /* select playercount */
  590.                 /**********************/
  591.  
  592.                 if ( joy & 2 )
  593.                 {
  594.                     SHORT i, d = 8;
  595.  
  596.                     while ( (Joystick(PORT2) & 2) && (PlayerCount < 10) )
  597.                     {
  598.                         PlayerCount++;
  599.                         sprintf(Buffer, "%u  Player", PlayerCount);
  600.                         SetAPen(grp, 0);
  601.                         WaitTOF();
  602.                         RectFill(grp, 0, 100, 155, 120);
  603.                         OPrintAt(grp, 150, 115, 1, Buffer);
  604.  
  605.                         for ( i = d ; i && (Joystick(PORT2) & 2); i-- )
  606.                         Delay(1);
  607.  
  608.                         if ( d > 1 )
  609.                         d--;
  610.                     }
  611.                 }
  612.  
  613.                 if ( joy & 4 )
  614.                 {
  615.                     SHORT i, d = 8;
  616.  
  617.                     while ( (Joystick(PORT2) & 4) && (PlayerCount > 2) )
  618.                     {
  619.                         PlayerCount--;
  620.                         sprintf(Buffer, "%u  Player", PlayerCount);
  621.                         SetAPen(grp, 0);
  622.                         WaitTOF();
  623.                         RectFill(grp, 0, 100, 155, 120);
  624.                         OPrintAt(grp, 150, 115, 1, Buffer);
  625.  
  626.                         for ( i = d ; i && (Joystick(PORT2) & 4); i-- )
  627.                         Delay(1);
  628.  
  629.                         if ( d > 1 )
  630.                         d--;
  631.                     }
  632.                 }
  633.                 break;
  634.  
  635.             case 23 :
  636.                 /***************/
  637.                 /* competition */
  638.                 /***************/
  639.  
  640.                 if ( joy & 1 )
  641.                 {
  642.                     if ( Level != 0 )
  643.                     {
  644.                         Competition();
  645.                         redraw = TRUE;
  646.                     }
  647.                 }
  648.                 break;
  649.             }
  650.  
  651.         /* check keyboard */
  652.             {
  653.             struct IntuiMessage *msg;
  654.             SHORT key;
  655.  
  656.             while ( msg = (struct IntuiMessage *)GetMsg(gwindow->UserPort) )
  657.                 {
  658.                 if ( msg->Class == VANILLAKEY )
  659.                     key = msg->Code;
  660.  
  661.                 ReplyMsg(msg);
  662.                 }
  663.  
  664.             while ( msg = (struct IntuiMessage *)GetMsg(pwindow->UserPort) )
  665.                 {
  666.                 if ( msg->Class == VANILLAKEY )
  667.                     key = msg->Code;
  668.  
  669.                 ReplyMsg(msg);
  670.                 }
  671.  
  672.             if ( (key >= '0') && (key <= '9') && (page != 1) )
  673.                 {
  674.                 if ( !keyboard )
  675.                     {
  676.                     Level = key - '0';
  677.                     keyboard = TRUE;
  678.                     }
  679.                 else
  680.                     {
  681.                     Level *= 10;
  682.                     Level += key - '0';
  683.  
  684.                     if ( Level > 400 )
  685.                         Level = 400;
  686.  
  687.                     if ( Level > 99 )
  688.                         keyboard = FALSE;
  689.                     }
  690.  
  691.                 if ( (page == 0) && (mode == 3) )
  692.                     {
  693.                     SetAPen(grp, 0);
  694.                     RectFill(grp, 160, 75, 319, 185);
  695.  
  696.                     if ( (Level > 300) && (Level < 400) )
  697.                         OPrintAt(grp, 170, 155, -1, "<-");
  698.                     else
  699.                         OPrintAt(grp, 170, 155, -1, "lock");
  700.                     }
  701.  
  702.                 SetAPen(grp, 0);
  703.                 if ( page == 0 )
  704.                     {
  705.                     sprintf(Buffer, "Level   %u", Level);
  706.                     RectFill(grp, 0, 100, 160, 120);
  707.                     OPrintAt(grp, 150, 115, 1, Buffer);
  708.                     }
  709.                 else
  710.                     {
  711.                     sprintf(Buffer, "Startlevel   %u", Level);
  712.                     RectFill(grp, 0, 120, 160, 140);
  713.                     OPrintAt(grp, 150, 135, 1, Buffer);
  714.                     }
  715.                 }
  716.             else if ( (key == 13) && (page == 0) )
  717.                 {
  718.                 keyboard = FALSE;
  719.                 }
  720.             else if ( (key == 'm') && (page == 1) )
  721.                 {
  722.                 music = !music;
  723.                 if ( !song )
  724.                     music = FALSE;
  725.  
  726.                 SetAPen(grp, 0);
  727.                 RectFill(grp, 0, 100, 160, 120);
  728.  
  729.                 if ( music )
  730.                     {
  731.                     sound = FALSE;
  732.                     RectFill(grp, 0, 120, 160, 140);
  733.                     OPrintAt(grp, 150, 115, 1, "»M« usic On");
  734.                     OPrintAt(grp, 150, 135, 1, "»S« ound Off");
  735.  
  736.                     PlayModule2(song);
  737.                     }
  738.                 else
  739.                     {
  740.                     OPrintAt(grp, 150, 115, 1, "»M« usic Off");
  741.                     StopPlayer();
  742.                     }
  743.                 }
  744.             else if ( (key == 's') && (page == 1) )
  745.                 {
  746.                 sound = !sound;
  747.  
  748.                 SetAPen(grp, 0);
  749.                 RectFill(grp, 0, 120, 160, 140);
  750.  
  751.                 if ( sound )
  752.                     {
  753.                     music = FALSE;
  754.                     StopPlayer();
  755.  
  756.                     RectFill(grp, 0, 100, 160, 120);
  757.                     OPrintAt(grp, 150, 115, 1, "»M« usic Off");
  758.                     OPrintAt(grp, 150, 135, 1, "»S« ound On");
  759.                     }
  760.                 else
  761.                     {
  762.                     OPrintAt(grp, 150, 135, 1, "»S« ound Off");
  763.                     }
  764.                 }
  765.             else if ( (key == 's') && (page == 0) )
  766.                 {
  767.                 if ( Level != 0 )
  768.                     {
  769.                     p1 = &Player[0];
  770.                     p2 = &Player[1];
  771.                     LoadLevel();
  772.                     Game();
  773.                     redraw = TRUE;
  774.                     }
  775.                 }
  776.             else if ( (key == 'e') && (page == 0) )
  777.                 {
  778.                 if ( (Level > 300) && (Level < 400) )
  779.                     {
  780.                     LoadLevel();
  781.                     EditLevel();
  782.                     redraw = TRUE;
  783.                     }
  784.                 else
  785.                     DisplayBeep(NULL);
  786.                 }
  787.             else if ( (key == 'q') && (page == 0) )
  788.                 {
  789.                 bool = FALSE;
  790.                 }
  791.             }
  792.  
  793.         while ( Joystick(PORT2) );
  794.         }
  795.  
  796.     CloseAll("Goodbye...");
  797.     }
  798.  
  799. /****************************/
  800. /* Competition()            */
  801. /****************************/
  802.  
  803. void Competition()
  804.     {
  805.     SHORT list[10];
  806.     BOOL bool = TRUE;
  807.     SHORT i;
  808.  
  809.     /*****************/
  810.     /* clear players */
  811.     /*****************/
  812.  
  813.     for ( i = 0 ; i < 10 ; i++ )
  814.         {
  815.         Player[i].GamesWon = 0;
  816.         Player[i].GamesPlayed = 0;
  817.         }
  818.  
  819.     /************************/
  820.     /* random first players */
  821.     /************************/
  822.  
  823.     p1 = &Player[rand() % PlayerCount];
  824.     do  {
  825.         p2 = &Player[rand() % PlayerCount];
  826.         } while ( p2 == p1 );
  827.  
  828.     while ( bool )
  829.         {
  830.         BOOL loop = TRUE;
  831.  
  832.         Delay(5);
  833.         while ( Joystick(PORT2) );
  834.         Delay(5);
  835.         while ( Joystick(PORT2) );
  836.  
  837.         /****************/
  838.         /* print screen */
  839.         /****************/
  840.  
  841.         SetAPen(grp, 0);
  842.         RectFill(grp, 0, 0, 319, 191);
  843.  
  844.         StdColors[0] = 0x000;
  845.         StdColors[1] = 0x000;
  846.         StdColors[2] = 0x000;
  847.         StdColors[3] = 0x000;
  848.         LoadRGB4(gvp, StdColors, 16);
  849.  
  850.         OPrintAt(grp, 160, 20, 0, "Shuffle Run Competition");
  851.         sprintf(Buffer, "Next Level : %u", Level);
  852.         OPrintAt(grp, 160, 60, 0, Buffer);
  853.  
  854.         OPrintAt(grp, 145, 90, 1, p1->Name);
  855.         OPrintAt(grp, 160, 90, 0, "vs.");
  856.         OPrintAt(grp, 175, 90, -1, p2->Name);
  857.  
  858.         sprintf(Buffer, "%u%% = %u/%u", (p1->GamesPlayed > 0) ? (100 * p1->GamesWon / p1->GamesPlayed ) : 0, p1->GamesWon, p1->GamesPlayed);
  859.         OPrintAt(grp, 145, 120, 1, Buffer);
  860.         sprintf(Buffer, "%u/%u = %u%%", p2->GamesWon, p2->GamesPlayed, (p2->GamesPlayed > 0) ? (100 * p2->GamesWon / p2->GamesPlayed) : 0);
  861.         OPrintAt(grp, 175, 120, -1, Buffer);
  862.  
  863.         OPrintAt(grp, 150, 150, 1, "Continue");
  864.         OPrintAt(grp, 160, 150, -1, "<-");
  865.         OPrintAt(grp, 150, 180, 1, "Cancel");
  866.  
  867.         StdColors[1] = 0xFFF;
  868.         StdColors[2] = 0xAAA;
  869.         StdColors[3] = 0x777;
  870.         StdColors[4] = 0x707;
  871.         LoadRGB4(gvp, StdColors, 16);
  872.  
  873.         i = 0;
  874.  
  875.         /*****************/
  876.         /* select option */
  877.         /*****************/
  878.  
  879.         while ( loop )
  880.             {
  881.             UBYTE joy = Joystick(PORT2);
  882.  
  883.             /**************/
  884.             /* move arrow */
  885.             /**************/
  886.  
  887.             if ( joy & 24 )
  888.                 {
  889.                 SetAPen(grp, 0);
  890.                 RectFill(grp, 155, 135, 319, 185);
  891.  
  892.                 if ( joy & 16 )
  893.                     {
  894.                     i = 0;
  895.                     OPrintAt(grp, 160, 150, -1, "<-");
  896.                     }
  897.                 else
  898.                     {
  899.                     i = 1;
  900.                     OPrintAt(grp, 160, 180, -1, "<-");
  901.                     }
  902.                 }
  903.  
  904.             if ( joy & 1 )
  905.                 {
  906.                 loop = FALSE;
  907.  
  908.                 if ( i == 0 )
  909.                     {
  910.                     SHORT min = 1000;
  911.  
  912.                     /**************/
  913.                     /* start game */
  914.                     /**************/
  915.  
  916.                     while ( Joystick(PORT2) );
  917.  
  918.                     LoadLevel();
  919.  
  920.                     switch ( Game() )
  921.                         {
  922.                         case -1 :
  923.                             for ( i = 0 ; i < PlayerCount ; i++ )
  924.                             if ( (&Player[i] != p1) && (Player[i].GamesPlayed <= min) )
  925.                                 {
  926.                                 p2 = &Player[i];
  927.                                 min = Player[i].GamesPlayed;
  928.                                 }
  929.                             break;
  930.  
  931.                         case 1 :
  932.                             for ( i = 0 ; i < PlayerCount ; i++ )
  933.                             if ( (&Player[i] != p2) && (Player[i].GamesPlayed <= min) )
  934.                                 {
  935.                                 p1 = &Player[i];
  936.                                 min = Player[i].GamesPlayed;
  937.                                 }
  938.                             break;
  939.                         }
  940.  
  941.                     Level++;
  942.                     if ( Level > 400 )
  943.                         bool = FALSE;;
  944.  
  945.                     }
  946.                 else
  947.                     bool = FALSE;
  948.                 }
  949.  
  950.             while ( Joystick(PORT2) );
  951.             } /* while (loop) */
  952.         } /* while (bool) */
  953.  
  954.     /* sort list */
  955.  
  956.     for ( i = 0 ; i < PlayerCount ; i++ )
  957.         {
  958.         list[i] = i;
  959.         if ( Player[i].GamesPlayed == 0 )
  960.             Player[i].GamesPlayed = 1;
  961.         }
  962.  
  963.     for ( i = 0 ; i < PlayerCount ; i++ )
  964.         {
  965.         SHORT j;
  966.         SHORT max = 100 * Player[list[i]].GamesWon / Player[list[i]].GamesPlayed;
  967.         SHORT maxpos = i;
  968.  
  969.         for ( j = i + 1 ; j < PlayerCount ; j++ )
  970.             {
  971.             if ( 100 * Player[list[j]].GamesWon / Player[list[j]].GamesPlayed > max )
  972.                 {
  973.                 max = 100 * Player[list[j]].GamesWon / Player[list[j]].GamesPlayed;
  974.                 maxpos = j;
  975.                 }
  976.             }
  977.  
  978.         if ( maxpos != i )
  979.             {
  980.             SHORT swap;
  981.  
  982.             swap = list[maxpos];
  983.             list[maxpos] = list[i];
  984.             list[i] = swap;
  985.             }
  986.         }
  987.  
  988.     SetAPen(grp, 0);
  989.     RectFill(grp, 0, 0, 319, 191);
  990.  
  991.     StdColors[0] = 0x000;
  992.     StdColors[1] = 0x000;
  993.     StdColors[2] = 0x000;
  994.     StdColors[3] = 0x000;
  995.     LoadRGB4(gvp, StdColors, 16);
  996.  
  997.     OPrintAt(grp, 160, 20, 0, "Shuffle Run Competition");
  998.     OPrintAt(grp, 160, 50, 0, "Ranking List");
  999.  
  1000.     SHORT j = 1, k = -1;
  1001.  
  1002.     for ( i = 0 ; i < PlayerCount ; i++ )
  1003.         {
  1004.         SHORT l;
  1005.  
  1006.         sprintf(Buffer, "%u%%", l = 100 * Player[list[i]].GamesWon / Player[list[i]].GamesPlayed);
  1007.         OPrintAt(grp, (i/5)*160+150, (i%5)*25+80, 1, Buffer);
  1008.  
  1009.         if ( k == -1 )
  1010.             k = l;
  1011.         else if ( k != l )
  1012.             {
  1013.             k = j;
  1014.             j++;
  1015.             }
  1016.  
  1017.         sprintf(Buffer, "%u) %s", j, Player[list[i]].Name);
  1018.         OPrintAt(grp, (i/5)*160+5, (i%5)*25+80, -1, Buffer);
  1019.         }
  1020.  
  1021.     StdColors[1] = 0xFFF;
  1022.     StdColors[2] = 0xAAA;
  1023.     StdColors[3] = 0x777;
  1024.     StdColors[4] = 0x707;
  1025.     LoadRGB4(gvp, StdColors, 16);
  1026.  
  1027.     Delay(5);
  1028.     while ( Joystick(PORT2) );
  1029.     Delay(5);
  1030.     while ( Joystick(PORT2) );
  1031.     while ( !(Joystick(PORT2) & 1) );
  1032.     }
  1033.  
  1034. /****************************/
  1035. /* EditLevel()              */
  1036. /****************************/
  1037.  
  1038. void Edit_Redraw(__D0 SHORT mode)
  1039.     {
  1040.     switch ( mode )
  1041.         {
  1042.         case FLOOR :
  1043.             ClipBlit(grp, 0, 224, grp, 304, 192, 16, 16, 0xC0);
  1044.             break;
  1045.         case GREYWALL :
  1046.             ClipBlit(grp, 16, 224, grp, 304, 192, 16, 16, 0xC0);
  1047.             break;
  1048.         case PINKWALL :
  1049.             ClipBlit(grp, 32, 224, grp, 304, 192, 16, 16, 0xC0);
  1050.             break;
  1051.         case PINKWALL2 :
  1052.             ClipBlit(grp, 48, 224, grp, 304, 192, 16, 16, 0xC0);
  1053.             break;
  1054.         case CLOSEDDOOR :
  1055.             ClipBlit(grp, 64, 224, grp, 304, 192, 16, 16, 0xC0);
  1056.             break;
  1057.         case HOLE :
  1058.             ClipBlit(grp, 0, 240, grp, 304, 192, 16, 16, 0xC0);
  1059.             break;
  1060.         case KEY :
  1061.             ClipBlit(grp, 16, 240, grp, 304, 192, 16, 16, 0xC0);
  1062.             break;
  1063.         case P1BONUS :
  1064.             ClipBlit(grp, 48, 240, grp, 304, 192, 16, 16, 0xC0);
  1065.             break;
  1066.         case P2BONUS :
  1067.             ClipBlit(grp, 32, 240, grp, 304, 192, 16, 16, 0xC0);
  1068.             break;
  1069.         case BONUS :
  1070.             ClipBlit(grp, 64, 240, grp, 304, 192, 16, 16, 0xC0);
  1071.             break;
  1072.         }
  1073.     ClipBlit(grp, 304, 192, grp, 304, 224, 16, 16, 0xC0);
  1074.     }
  1075.  
  1076. void EditLevel()
  1077.     {
  1078.     p1 = &Player[0];
  1079.     p1->XPos = 0;
  1080.     p1->YPos = 0;
  1081.     p2 = &Player[1];
  1082.     p2->XPos = 19;
  1083.     p2->YPos = 11;
  1084.  
  1085.     /*************/
  1086.     /* draw area */
  1087.     /*************/
  1088.         {
  1089.         SHORT x, y;
  1090.  
  1091.         LoadRGB4(gvp, GameColors, 16);
  1092.  
  1093.         for ( x = 0 ; x < 20 ; x++ )
  1094.             for ( y = 0 ; y < 12 ; y++ )
  1095.             PutArea(y, x);
  1096.         }
  1097.  
  1098.     ClipBlit(grp, 0, 192, grp,  128, 192, 16, 16, 0xC0); /* fill with floor */
  1099.     ClipBlit(grp, 0, 208, grp,  144, 192, 16, 16, 0xC0); /* with holes */
  1100.     ClipBlit(grp, 64, 208, grp, 160, 192, 16, 16, 0xC0); /* with bonus */
  1101.     ClipBlit(grp, 16, 192, grp, 128, 208, 16, 16, 0xC0); /* with graywall */
  1102.     ClipBlit(grp, 32, 192, grp, 144, 208, 16, 16, 0xC0); /* with pinkwall */
  1103.     ClipBlit(grp, 48, 192, grp, 160, 208, 16, 16, 0xC0); /* with pinkwall2 */
  1104.  
  1105.     SetAPen(grp, 0);
  1106.     RectFill(grp, 240, 192, 319, 207);
  1107.     SetAPen(grp, 5);
  1108.     PrintAt(grp, 200, 205, 0, "X");
  1109.     PrintAt(grp, 216, 205, 0, "Y");
  1110.     PrintAt(grp, 248, 205, 0, "Q");
  1111.     PrintAt(grp, 280, 205, 0, "S");
  1112.     ClipBlit(grp, 0, 192, grp, 0, 224, 320, 32, 0xC0);
  1113.  
  1114.     MoveScreen(pscreen, 0, 32);
  1115.  
  1116.     /************/
  1117.     /* mainloop */
  1118.     /************/
  1119.         {
  1120.         BOOL bool = TRUE;
  1121.         SHORT xpos = 0, ypos = 0;
  1122.         SHORT mode = FLOOR;
  1123.  
  1124.         Edit_Redraw(mode);
  1125.  
  1126.         while (bool)
  1127.             {
  1128.             SetAPen(grp, 5);
  1129.             Move(grp, 16*xpos, 16*ypos);
  1130.             Draw(grp, 16*xpos+15, 16*ypos);
  1131.             Draw(grp, 16*xpos+15, 16*ypos+15);
  1132.             Draw(grp, 16*xpos, 16*ypos+15);
  1133.             Draw(grp, 16*xpos, 16*ypos);
  1134.  
  1135.             Delay(5);
  1136.             UBYTE joy = Joystick(PORT2);
  1137.  
  1138.             if ( joy & 1 )
  1139.                 {
  1140.                 if ( ypos >= 12 )
  1141.                     {
  1142.                     switch ( xpos + (ypos - 12)*20)
  1143.                         {
  1144.                         case 5 :
  1145.                         case 6 :
  1146.                         case 26 :
  1147.                             DisplayBeep(NULL);
  1148.                             break;
  1149.  
  1150.                         case 0 :
  1151.                             mode = FLOOR;
  1152.                             Edit_Redraw(mode);
  1153.                             break;
  1154.                         case 1 :
  1155.                             mode = GREYWALL;
  1156.                             Edit_Redraw(mode);
  1157.                             break;
  1158.                         case 2 :
  1159.                             mode = PINKWALL;
  1160.                             Edit_Redraw(mode);
  1161.                             break;
  1162.                         case 3 :
  1163.                             mode = PINKWALL2;
  1164.                             Edit_Redraw(mode);
  1165.                             break;
  1166.                         case 4 :
  1167.                             mode = CLOSEDDOOR;
  1168.                             Edit_Redraw(mode);
  1169.                             break;
  1170.                         case 20 :
  1171.                             mode = HOLE;
  1172.                             Edit_Redraw(mode);
  1173.                             break;
  1174.                         case 21 :
  1175.                             mode = KEY;
  1176.                             Edit_Redraw(mode);
  1177.                             break;
  1178.                         case 22 :
  1179.                             mode = P2BONUS;
  1180.                             Edit_Redraw(mode);
  1181.                             break;
  1182.                         case 23 :
  1183.                             mode = P1BONUS;
  1184.                             Edit_Redraw(mode);
  1185.                             break;
  1186.                         case 24 :
  1187.                             mode = BONUS;
  1188.                             Edit_Redraw(mode);
  1189.                             break;
  1190.  
  1191.                         case 8 :
  1192.                         case 9 :
  1193.                         case 10 :
  1194.                         case 28 :
  1195.                         case 29 :
  1196.                         case 30 :
  1197.                             {
  1198.                             SHORT i;
  1199.  
  1200.                             for ( i = 100 ; i ; i-- )
  1201.                                 {
  1202.                                 DisplayBeep(NULL);
  1203.                                 Delay(1);
  1204.  
  1205.                                 if ( Joystick(PORT2) == 0 )
  1206.                                     break;
  1207.                                 }
  1208.  
  1209.                             if ( i )
  1210.                                 break;
  1211.  
  1212.                             switch ( xpos + (ypos - 12)*20)
  1213.                                 {
  1214.                                 case 8 :
  1215.                                     {
  1216.                                     SHORT x, y;
  1217.  
  1218.                                     for ( x = 0 ; x < 20 ; x++ )
  1219.                                         for ( y = 0 ; y < 12 ; y++ )
  1220.                                         {
  1221.                                             Area[y][x] = FLOOR;
  1222.                                             PutArea(y, x);
  1223.                                         }
  1224.                                     break;
  1225.                                     }
  1226.                                 case 9 :
  1227.                                     {
  1228.                                     SHORT x, y;
  1229.  
  1230.                                     for ( x = 0 ; x < 20 ; x++ )
  1231.                                         for ( y = 0 ; y < 12 ; y++ )
  1232.                                         {
  1233.                                             Area[y][x] = HOLE;
  1234.                                             PutArea(y, x);
  1235.                                         }
  1236.                                     break;
  1237.                                     }
  1238.                                 case 10 :
  1239.                                     {
  1240.                                     SHORT x, y;
  1241.  
  1242.                                     for ( x = 0 ; x < 20 ; x++ )
  1243.                                         for ( y = 0 ; y < 12 ; y++ )
  1244.                                         {
  1245.                                             Area[y][x] = BONUS;
  1246.                                             PutArea(y, x);
  1247.                                         }
  1248.                                     break;
  1249.                                     }
  1250.                                 case 28 :
  1251.                                     {
  1252.                                     SHORT x, y;
  1253.  
  1254.                                     for ( x = 0 ; x < 20 ; x++ )
  1255.                                         for ( y = 0 ; y < 12 ; y++ )
  1256.                                         {
  1257.                                             Area[y][x] = GREYWALL;
  1258.                                             PutArea(y, x);
  1259.                                         }
  1260.                                     break;
  1261.                                     }
  1262.                                 case 29 :
  1263.                                     {
  1264.                                     SHORT x, y;
  1265.  
  1266.                                     for ( x = 0 ; x < 20 ; x++ )
  1267.                                         for ( y = 0 ; y < 12 ; y++ )
  1268.                                         {
  1269.                                             Area[y][x] = PINKWALL;
  1270.                                             PutArea(y, x);
  1271.                                         }
  1272.                                     break;
  1273.                                     }
  1274.                                 case 30 :
  1275.                                     {
  1276.                                     SHORT x, y;
  1277.  
  1278.                                     for ( x = 0 ; x < 20 ; x++ )
  1279.                                         for ( y = 0 ; y < 12 ; y++ )
  1280.                                         {
  1281.                                             Area[y][x] = PINKWALL2;
  1282.                                             PutArea(y, x);
  1283.                                         }
  1284.                                     break;
  1285.                                     }
  1286.                                 }
  1287.  
  1288.                             break;
  1289.                             }
  1290.                         case 12 :
  1291.                             {
  1292.                             SHORT x, y;
  1293.  
  1294.                             for ( x = 0 ; x < 10 ; x++ )
  1295.                                 for ( y = 0 ; y < 12 ; y++ )
  1296.                                 {
  1297.                                     switch ( Area[y][x] )
  1298.                                     {
  1299.                                         case P1BONUS :
  1300.                                         Area[11-y][19-x] = P2BONUS;
  1301.                                         break;
  1302.                                         case P2BONUS :
  1303.                                         Area[11-y][19-x] = P1BONUS;
  1304.                                         break;
  1305.                                         default :
  1306.                                         Area[11-y][19-x] = Area[y][x];
  1307.                                         break;
  1308.                                     }
  1309.  
  1310.                                     PutArea(11-y, 19-x);
  1311.                                 }
  1312.                             break;
  1313.                             }
  1314.                         case 13 :
  1315.                             {
  1316.                             SHORT x, y;
  1317.  
  1318.                             for ( y = 0 ; y < 6 ; y++ )
  1319.                                 for ( x = 0 ; x < 20 ; x++ )
  1320.                                 {
  1321.                                     switch ( Area[y][x] )
  1322.                                     {
  1323.                                         case P1BONUS :
  1324.                                         Area[11-y][19-x] = P2BONUS;
  1325.                                         break;
  1326.                                         case P2BONUS :
  1327.                                         Area[11-y][19-x] = P1BONUS;
  1328.                                         break;
  1329.                                         default :
  1330.                                         Area[11-y][19-x] = Area[y][x];
  1331.                                         break;
  1332.                                     }
  1333.  
  1334.                                     PutArea(11-y, 19-x);
  1335.                                 }
  1336.                             break;
  1337.                             }
  1338.                         case 15 :
  1339.                             bool = FALSE;
  1340.                             break;
  1341.                         case 17 :
  1342.                             {
  1343.                             Area[0][0] = 2;
  1344.                             Area[11][19] = 2;
  1345.  
  1346.                             struct FileHandle *file;
  1347.  
  1348.                             if ( file = (struct FileHandle *)Open("Levels.data", MODE_OLDFILE) )
  1349.                                 {
  1350.                                 LONG index = (Level-1) * 240;
  1351.  
  1352.                                 Seek(file, index, OFFSET_BEGINNING);
  1353.  
  1354.                                 Write(file, Area, 240);
  1355.  
  1356.                                 Close(file);
  1357.                                 }
  1358.                             else
  1359.                                 {
  1360.                                 DisplayBeep(NULL);
  1361.                                 }
  1362.                             bool = FALSE;
  1363.                             break;
  1364.                             }
  1365.                         }
  1366.                     }
  1367.                 else
  1368.                     {
  1369.                     if ( ((xpos == 0) && (ypos == 0)) || ((xpos == 19) && (ypos == 11)) )
  1370.                         {
  1371.                         DisplayBeep(NULL);
  1372.                         }
  1373.                     else
  1374.                         {
  1375.                         Area[ypos][xpos] = mode;
  1376.                         PutArea(ypos, xpos);
  1377.                         }
  1378.                     }
  1379.                 }
  1380.             else
  1381.                 {
  1382.                 if ( joy & 2 )
  1383.                     {
  1384.                     if ( ypos < 12 )
  1385.                         PutArea(ypos, xpos);
  1386.                     else
  1387.                         ClipBlit(grp, 0, 224, grp, 0, 192, 320, 32, 0xC0);
  1388.  
  1389.                     xpos++;
  1390.                     if (xpos > 19)
  1391.                         xpos = 0;
  1392.                     }
  1393.                 if ( joy & 4 )
  1394.                     {
  1395.                     if ( ypos < 12 )
  1396.                         PutArea(ypos, xpos);
  1397.                     else
  1398.                         ClipBlit(grp, 0, 224, grp, 0, 192, 320, 32, 0xC0);
  1399.  
  1400.                     xpos--;
  1401.                     if (xpos < 0)
  1402.                         xpos = 19;
  1403.                     }
  1404.                 if ( joy & 8 )
  1405.                     {
  1406.                     if ( ypos < 12 )
  1407.                         PutArea(ypos, xpos);
  1408.                     else
  1409.                         ClipBlit(grp, 0, 224, grp, 0, 192, 320, 32, 0xC0);
  1410.  
  1411.                     ypos++;
  1412.                     if (ypos > 13)
  1413.                         ypos = 0;
  1414.                     }
  1415.                 if ( joy & 16 )
  1416.                     {
  1417.                     if ( ypos < 12 )
  1418.                         PutArea(ypos, xpos);
  1419.                     else
  1420.                         ClipBlit(grp, 0, 224, grp, 0, 192, 320, 32, 0xC0);
  1421.  
  1422.                     ypos--;
  1423.                     if (ypos < 0)
  1424.                         ypos = 11;
  1425.                     }
  1426.                 }
  1427.             }
  1428.         }
  1429.  
  1430.     MoveScreen(pscreen, 0, -32);
  1431.     }
  1432.  
  1433.  
  1434.